// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.core;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class IndieFileLoader {
    public static InputStreamReader getStreamReader(String path) throws FileNotFoundException {
        return getStreamReader(path, false);
    }

    public static InputStreamReader getStreamReader(String path, boolean bIgnoreJar) throws FileNotFoundException {
        InputStreamReader inputStreamReader = null;
        Object object = null;
        if (object != null && !bIgnoreJar) {
            inputStreamReader = new InputStreamReader((InputStream)object);
        } else {
            try {
                FileInputStream fileInputStream0 = new FileInputStream(zombie.ZomboidFileSystem.instance.getString(path));
                inputStreamReader = new InputStreamReader(fileInputStream0, "UTF-8");
            } catch (Exception exception) {
                FileInputStream fileInputStream1 = new FileInputStream(Core.getMyDocumentFolder() + File.separator + "mods" + File.separator + path);
                inputStreamReader = new InputStreamReader(fileInputStream1);
            }
        }

        return inputStreamReader;
    }
}
